<template>
  <div class="page7 wow" style="visibility: visible">
    <div class="title">
      <div>
        <b><span>24</span></b>
        <span>年</span>
      </div>
      <div>
        <h3>专注绵阳品质整装</h3>
        <h2>全案服务引领者</h2>
      </div>
    </div>
    <div class="swipers">
      <div class="img-wrap">
        <img src="/src/assets/img/p7_bj.jpg" alt="" />
        <div class="text">
          <ul>
            <li>
              <div>
                <div>
                  <span><numberScroll :value="200000"></numberScroll></span>
                  <b>户+</b>
                </div>
                <p>川内业主优选</p>
              </div>
            </li>
            <li>
              <div>
                <div>
                  <span><numberScroll :value="3000"></numberScroll></span>
                  <b>㎡ +</b>
                </div>
                <p>平甄选主材展馆</p>
              </div>
            </li>
            <li>
              <div>
                <div>
                  <span><numberScroll :value="6"></numberScroll></span>
                  <b>家</b>
                </div>
                <p>一城6店</p>
              </div>
            </li>
          </ul>
          <div class="wrap">
            <swiper
            slidesPerView="2"
            @swiper="onSwiper" 
            @slideChange="onSlideChange"
            :modules="modules"
            :navigation="navigation"
            >
              <swiper-slide>
                <div>
                  <div class="slide_icon">
                    <i><img
                      alt=""
                      src="/src/assets/img/p7_s_01.png"
                  /></i>
                  </div>
                  <p>装协标杆企业</p>
                </div>
              </swiper-slide>
              <swiper-slide>
                <div>
                  <div class="slide_icon">
                    <i><img
                      alt=""
                      src="/src/assets/img/p7_s_02.png"
                  /></i>
                  </div>
                  <p>二级资质单位</p>
                </div>
              </swiper-slide>
              <swiper-slide>
                <div>
                  <div class="slide_icon">
                    <i><img
                      alt=""
                      src="/src/assets/img/p7_s_01.png"
                  /></i>
                  </div>
                  <p>装协标杆企业</p>
                </div>
              </swiper-slide>
              <swiper-slide>
                <div>
                  <div class="slide_icon">
                    <i><img
                      alt=""
                      src="/src/assets/img/p7_s_02.png"
                  /></i>
                  </div>
                  <p>二级资质单位</p>
                </div>
              </swiper-slide>
            </swiper>
          </div>
          <div class="button-wrap">
            <div class="btn" @click="toPage('about')">走进雅阁汇</div>
          </div>
        </div>
      </div>
    </div>
    <div class="btn">
      <div class="prev7"></div>
      <div class="next7"></div>
    </div>
  </div>
</template>

<script setup>
import { Navigation, A11y } from 'swiper/modules'
import { Swiper, SwiperSlide } from 'swiper/vue'
import 'swiper/css'
import 'swiper/css/navigation'
import { ref } from 'vue'
import { useRouter } from 'vue-router';

const navigation = ref({
  nextEl: '.next7',
  prevEl: '.prev7'
})
const modules = ref([ Navigation, A11y])
const router = useRouter()
const toPage = (page,id)=>{
  let data = {
    name:page,
  }
  if(id){
    data.query = {id:id}
  }
  router.push(data).then(()=>{
    window.scrollTo({
      top:0
    })
  })
}
</script>

<style>
.home .page7 {
  position: relative;
  opacity: 0;
  animation: slide-down-in 1s, fade-in 1s;
  animation-fill-mode: forwards;
  margin-top: -0.01rem;
}

.home .page7 > .title {
  position: absolute;
  top: 0;
  z-index: 99;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
}

.home .page7 > .title div:first-child {
  margin-left: 0.29rem;
  color: #dd292c;
}

.home .page7 > .title div:first-child b {
  font-size: 1.1rem;
  font-family: Gilroy-Bold;
  display: inline-block;
}

.home .page7 > .title div:first-child > span {
  font-size: 0.45rem;
  font-weight: 700;
}

.home .page7 > .title div:nth-child(2) {
  margin-left: 0.42rem;
}

.home .page7 > .title div:nth-child(2) h3 {
  font-size: 0.45rem;
  font-weight: 500;
  color: #000;
}

.home .page7 > .title div:nth-child(2) h2 {
  font-size: 0.55rem;
  font-weight: 500;
  color: #000;
}

.home .page7 .swipers .img-wrap {
  position: relative;
}

.home .page7 .swipers .img-wrap .text {
  position: absolute;
  left: 0;
  top: 3.57rem;
  width: 100%;
}

.home .page7 .swipers .img-wrap .text ul {
  display: flex;
  flex-wrap: wrap;
  padding: 0 0 0 0.3rem;
}

.home .page7 .swipers .img-wrap .text ul li {
  width: 50%;
  margin-bottom: 0.44rem;
}

.home .page7 .swipers .img-wrap .text ul li div {
  color: #dd292c;
}

.home .page7 .swipers .img-wrap .text ul li div div {
  display: flex;
}

.home .page7 .swipers .img-wrap .text ul li div div span {
  font-size: 0.56rem;
  font-family: Gilroy-Bold;
  font-weight: 700;
  display: inline-block;
}

.home .page7 .swipers .img-wrap .text ul li div div b {
  font-size: 0.46rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.home .page7 .swipers .img-wrap .text ul li div div b span {
  font-size: 0.29rem;
  transform: translateY(0.03rem);
}

.home .page7 .swipers .img-wrap .text ul li div div b i {
  font-style: normal;
  font-size: 0.27rem;
  transform: translateY(-0.08rem);
}

.home .page7 .swipers .img-wrap .text ul li p {
  height: 0.23rem;
  font-size: 0.24rem;
  font-weight: 700;
  color: #000;
}
.home .page7 .swipers .img-wrap .text .wrap {
  display: flex;
  width: 6rem;
  padding-top: 0.2rem;
  margin-bottom: 0.4rem;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-container {
  width: 6rem;
  padding-right: 0.15rem;
  padding-left: 0.1rem;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide {
  box-sizing: border-box;
  padding-left: 0.2rem;
  transition: 0.3s;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide.swiper-slide-active > div,
.home .page7 .swipers .img-wrap .text .wrap .swiper-slide.swiper-slide-next > div {
  box-shadow: 0 0.22rem 0.3rem 0.01rem hsla(0, 0%, 40%, 0.35);
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide.swiper-slide-prev {
  margin-left: -0.05rem;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide.swiper-slide-prev > div {
  box-shadow: 0 0.22rem 0.3rem 0.01rem hsla(0, 0%, 40%, 0.35);
}
.home .page7 .swipers .img-wrap .text .wrap .swiper-slide .slide_icon{
  padding: 0.2rem 0 0.4rem;
  margin: 0.2rem;
  background: url(/src/assets/img/p7_s_bj.png) no-repeat;
  background-size: 100% 100%;
} 
.home .page7 .swipers .img-wrap .text .wrap .swiper-slide > div {
  width: 2.63rem;
  transition: 0.3s;
  height: 1.99rem;
  box-shadow: 0 0.22rem 0.3rem 0.01rem hsla(0, 0%, 40%, 0);
  border-radius: 0.1rem;
  background: #fff;
  background-size: 2.15rem 1.74rem;
  box-sizing: border-box;
  overflow: hidden;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide > div:nth-child(2) {
  margin-left: 0.27rem;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide > div i {
  width: 0.5rem;
  height: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.home .page7 .swipers .img-wrap .text .wrap .swiper-slide > div i img {
  max-width: 0.49rem;
}
.home .page7 .swipers .img-wrap .text .wrap .swiper-slide > div p {
  font-size: 0.24rem;
  font-weight: 700;
  text-align: center;
  white-space: pre-wrap;
  color: #000;
}

.home .page7 .swipers .img-wrap .text .button-wrap {
  margin: 0 0 0 0.3rem;
}
.home .page7 > .btn {
  position: absolute;
  right: 0.41rem;
  top: 7.14rem;
  width: 0.74rem;
  height: 0.74rem;
  background: #fff;
  box-shadow: 0 0.22rem 0.39rem 0.01rem hsla(0, 0%, 40%, 0.35);
  border-radius: 50%;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home .page7 > .btn div {
  width: 0.37rem;
  height: 0.74rem;
  outline: none;
  cursor: pointer;
}

.home .page7 > .btn div:first-child,
.home .page7 .btn div:first-child:active {
  background: url()
    no-repeat 0.18rem;
  background-size: 0.11rem 0.22rem;
}

.home .page7 > .btn div:nth-child(2),
.home .page7 .btn div:nth-child(2):active {
  background: url()
    no-repeat 0.05rem;
  background-size: 0.11rem 0.22rem;
}
.home .page7 .swipers .btn {
  width: 2.5rem;
  height: 0.74rem;
  border-radius: 0.1rem;
}
</style>